﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SportsPlatform.Query.CompetitionProjec
{
    /// <summary>
    /// 新增、编辑参赛项目传入参数
    /// </summary>
    public class EditCompetitionProjecQuery
    {
        /// <summary>
        /// 项目ID
        /// </summary>
        public Guid? Id { get; set; }

        /// <summary>
        /// 所属赛事
        /// </summary>
        [Required]
        public Guid CompetitionId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 项目ID
        /// </summary>
        public Guid ProjectId { get; set; }

        /// <summary>
        /// 比赛类型
        /// </summary>
        public int GameType { get; set; }

        /// <summary>
        /// 成绩计算规则
        /// </summary>
        public Guid CalculationRule { get; set; }

        /// <summary>
        /// 成绩惩罚规则
        /// </summary>
        public Guid PunishmentRule { get; set; }

        /// <summary>
        /// 比赛日期
        /// </summary>
        public DateTime? GameDate { get; set; }

        /// <summary>
        /// 比赛开始时间
        /// </summary>
        public DateTime GameBeginTime { get; set; }

        /// <summary>
        /// 比赛结束时间
        /// </summary>
        public DateTime GameEndTime { get; set; }

        /// <summary>
        /// 比赛时长（分钟）
        /// </summary>
        public int GameTime { get; set; }


        /// <summary>
        /// 决赛比赛时长（分钟）
        /// </summary>
        public int FinalsGameTime { get; set; }

        /// <summary>
        /// 最多感应器数量
        /// </summary>
        public int? SensorsMaxNum { get; set; }

        /// <summary>
        /// 团队最多人数
        /// </summary>
        public int? TeamMaxUserNum { get; set; }

        /// <summary>
        /// 个人赛报名人数最大限制
        /// 团队赛不需要传0
        /// </summary>
        public int MaxEmployeeNum { get; set; }

        /// <summary>
        /// 报名限制（1：允许单人报名；2：不允许单人报名）
        /// </summary>
        public int SignUpLimit { get; set; }

        /// <summary>
        /// 组队限制（1：允许现场组队；2：不允许现场组队）
        /// </summary>
        public int GroupLimit { get; set; }

        /// <summary>
        /// 报名费用
        /// </summary>
        public decimal? CostMoney { get; set; }

        /// <summary>
        /// 费用类型（1：元/人；2：元/队）
        /// </summary>
        public int? CostType { get; set; }

        /// <summary>
        /// 是否免费
        /// </summary>
        public bool IsFree { get; set; }

        /// <summary>
        /// 项目举办地点
        /// </summary>
        [Required]
        public string Address { get; set; }

        /// <summary>
        /// 项目比赛场馆
        /// </summary>
        [Required]
        public string Stadium { get; set; }

        /// <summary>
        /// 比赛详细地址
        /// </summary>
        [Required]
        public string DetailsAddress { get; set; }

        /// <summary>
        /// 详细地址坐标点
        /// </summary>
        public string Point { get; set; }

        /// <summary>
        /// 项目咨询人
        /// </summary>
        [Required]
        public string Consultant { get; set; }

        /// <summary>
        /// 咨询电话
        /// </summary>
        [Required]
        public string TelePhone { get; set; }

        /// <summary>
        /// 状态（0：关闭；1：启用）
        /// </summary>
        [Required]
        public int State { get; set; }
    }

    /// <summary>
    /// 赛事项目ID传入参数
    /// </summary>
    public class CompetitionProjectIdQuery
    {
        /// <summary>
        /// 比赛项目ID
        /// </summary>
        public Guid Id { get; set; }
    }

    /// <summary>
    /// 获取成绩规则列表
    /// </summary>
    public class GetRuleListQuery
    {
        /// <summary>
        /// 规则类型    0：成绩计算规则；1：成绩惩罚规则
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 项目标识
        /// </summary>
        public Guid ProjectId { get; set; }
    }
}
